// electron.vite.config.ts
import { resolve } from "path";
import { defineConfig, externalizeDepsPlugin, bytecodePlugin } from "electron-vite";
import vue from "@vitejs/plugin-vue";
var __electron_vite_injected_dirname = "D:\\web_project\\raymond-app";
var electron_vite_config_default = defineConfig({
  main: {
    plugins: [externalizeDepsPlugin(), bytecodePlugin()]
  },
  preload: {
    plugins: [externalizeDepsPlugin(), bytecodePlugin()]
  },
  renderer: {
    build: {
      // outDir: resolve(__dirname, 'dist/renderer'), // 打包后输出目录
      rollupOptions: {
        input: {
          main: resolve(__electron_vite_injected_dirname, "src/renderer/index.html"),
          child: resolve(__electron_vite_injected_dirname, "src/renderer/src/mini_program/index.html")
        }
      },
      commonjsOptions: {
        transformMixedEsModules: true
      }
    },
    resolve: {
      alias: {
        "@renderer": resolve("src/renderer/src")
      }
    },
    server: {
      hmr: true
      // 启用 HMR
      /* hmr: {
        overlay: false, // 可选：关闭错误覆盖层
      }, */
    },
    plugins: [
      // commonjs(),
      vue()
    ]
  }
});
export {
  electron_vite_config_default as default
};
